//*************************************************************************
// RollingDice.java     Author:20172330
//
// Demonstrates the creation and use of a user-defined class.
//*************************************************************************

public class Li41
{
  //-----------------------------------------------------------------------
  // Creates two Die obiects and rolls them several times.
  //-----------------------------------------------------------------------
  public static void main(String []args)
  {
    Die die1;
    Die die2;
    int sum;

    die1 = new Die();
    die2 = new Die();

    die1.roll();
    die2.roll();
    System.out.println("Die One: " + die1 +", Die Two: " + die2);

    die1.roll();
    
    System.out.println("Die One: " + die1 +", Die Two: " + die2);

    sum = die1.getFaceValue() + die2.getFaceValue();
    System.out.println("sum: " + sum);

    sum = die1.roll() + die2.roll();
    System.out.println("Die One: " + die1 + ", Die Two: " + die2);
    System.out.println("New sum: " +sum);
   }
} 
